class Animation < Sketch3D
  def container
    super do
      box(:tx => 1.5, :fill => Red)
      box(:tx => -1.5, :fill => Gray80)
      box(:ty => 1.5, :fill => Blue)
      box(:ty => -1.5, :fill => Yellow)
      box(:tz => -1.5, :fill => Purple)
      block do
        pointLight(0.0, 0.8, 1.0, 0.0, 20.0, 200.0)
        pointLight(0.0, 0.0, 1.0, 40.0, 200.0, 2000.0)
        ambientLight(0.0, 0.0, 0.1, -2.0, -20.0, 8.0)
        ambientLight(0.0, 0.0, 0.1, 200.0, -100.0, 18.0)
        #pointLight(0.0, 0.3, 0.5, 1.0, 8.0, 2.0)
        background 0
        noStroke
      end

      group do
        block do
          @rx = pi_pulse(5000)
          @rz = pi_pulse(2000)
        end
        group do
          box(:ty => 0.6, :fill => Green)  do
            block do
              @ry = @rz = pi_pulse(60)
            end
          end
          box(:ty => -0.6, :fill => Blue) do
            block do
              @ry = @rz = pi_pulse(100) * -1
            end
          end
        end
      end
    end
  end
end
